<h1>Listing matches</h1>

<table>
  <tr>
    <th>User</th>
    <th>Oponent</th>
    <th>Score</th>
    <th>Date</th>
    <th>Comment</th>
  </tr>

<% for match in @matches %>
  <tr>
    <td><%=h match.user_id %></td>
    <td><%=h match.oponent_id %></td>
    <td><%=h match.score %></td>
    <td><%=h match.date %></td>
    <td><%=h match.comment %></td>
    <td><%= link_to 'Show', match %></td>
    <td><%= link_to 'Edit', edit_match_path(match) %></td>
    <td><%= link_to 'Destroy', match, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New match', new_match_path %>
